package com.mybatis.plugin.test.model;

import javax.persistence.Column;
import javax.persistence.Id;

import com.automapper.sharding.TableSharding;

import lombok.Getter;
import lombok.Setter;

/**
 * The persistent class for the api_out_wms_sale_order_header database table.
 * 
 */
@Getter
@Setter
public class TbSharding extends TableSharding {

	@Id
	@Column
	private Long id;

	@Column(name = "order_sn")
	private String orderSn;

	@Column(name = "user_id")
	private Long userId;

	@Override
	public String getShardingTable() {
		long mod = id %2;
		return "tb_sharding_" + mod;
	}

}